package com.dfrz.stockMarket.dao;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * DAO基类，其它DAO可以直接继承这个DAO
 * @author Niko
 *
 */
public class BaseDao {

	public static Connection returncon() throws Exception{
		//加载驱动
				Class.forName("oracle.jdbc.driver.OracleDriver");
				System.out.println("加载成功");
				//获取连接
				Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:XE", "hr", "hr");
				System.out.println("连接成功");
				//�?��事务
				conn.setAutoCommit(false);
		return conn;
		
	}
}
